package com.aidex.baseinfo.domain;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import com.aidex.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.aidex.common.utils.log.annotation.FieldRemark;
import com.aidex.common.utils.log.annotation.LogField;
import com.aidex.common.annotation.Excel;

/**
 * 供应商信息对象 base_supplier
 * @author cq
 * @email 382425530@qq.com
 * @date 2023-06-20
 */
@Data
public class BaseSupplier extends BaseEntity<BaseSupplier>
{
    private static final long serialVersionUID = 1L;

    /** 供应商名称 */
    @Excel(name = "供应商名称")
    @NotBlank(message = "供应商名称不允许为空")
    @LogField
    @FieldRemark(name = "供应商名称",field = "name")
    private String name;

    /** 联系人 */
    @Excel(name = "联系人")
    @NotBlank(message = "联系人不允许为空")
    @LogField
    @FieldRemark(name = "联系人",field = "contact")
    private String contact;

    /** 联系电话 */
    @Excel(name = "联系电话")
    @NotBlank(message = "联系电话不允许为空")
    @LogField
    @FieldRemark(name = "联系电话",field = "telephone")
    private String telephone;

    /** 邮箱 */
    @Excel(name = "邮箱")
    @NotBlank(message = "邮箱不允许为空")
    @LogField
    @FieldRemark(name = "邮箱",field = "email")
    private String email;

    /** 所在地区 */
    @Excel(name = "所在地区")
    @NotBlank(message = "所在地区不允许为空")
    @LogField
    @FieldRemark(name = "所在地区",field = "areaname")
    private String areaname;

    /** 详细地址 */
    @Excel(name = "详细地址")
    @NotBlank(message = "详细地址不允许为空")
    @LogField
    @FieldRemark(name = "详细地址",field = "address")
    private String address;

    /** 地区编码 */
    @Excel(name = "地区编码")
    private String areacode;

    /** 有效期 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @LogField
    @FieldRemark(name = "有效期",field = "validaty")
    private Date validaty;

    /** 有效期开始 */
    private String beginValidaty;

    /** 有效期结束 */
    private String endValidaty;
	
    /** 状态 */
    @NotBlank(message = "状态不允许为空")
    @LogField
    @FieldRemark(name = "状态",field = "state")
    private String state;

    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }

    public void setContact(String contact) 
    {
        this.contact = contact;
    }

    public String getContact() 
    {
        return contact;
    }

    public void setTelephone(String telephone) 
    {
        this.telephone = telephone;
    }

    public String getTelephone() 
    {
        return telephone;
    }

    public void setEmail(String email) 
    {
        this.email = email;
    }

    public String getEmail() 
    {
        return email;
    }

    public void setAreaname(String areaname) 
    {
        this.areaname = areaname;
    }

    public String getAreaname() 
    {
        return areaname;
    }

    public void setAddress(String address) 
    {
        this.address = address;
    }

    public String getAddress() 
    {
        return address;
    }

    public void setAreacode(String areacode) 
    {
        this.areacode = areacode;
    }

    public String getAreacode() 
    {
        return areacode;
    }

    public void setValidaty(Date validaty) 
    {
        this.validaty = validaty;
    }

    public Date getValidaty() 
    {
        return validaty;
    }

    public void setState(String state) 
    {
        this.state = state;
    }

    public String getState() 
    {
        return state;
    }


    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("name", getName())
            .append("contact", getContact())
            .append("telephone", getTelephone())
            .append("email", getEmail())
            .append("areaname", getAreaname())
            .append("address", getAddress())
            .append("areacode", getAreacode())
            .append("validaty", getValidaty())
            .append("state", getState())
            .append("remark", getRemark())
            .append("id", getId())
            .append("createBy", getCreateBy())
            .append("createDept", getCreateDept())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .append("updateIp", getUpdateIp())
            .append("version", getVersion())
            .append("delFlag", getDelFlag())
            .toString();
    }
}
